<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{$title}</title>
<!-- Import google fonts - Heading first/ text second -->
<link rel='stylesheet' type='text/css' href='http://fonts.useso.com/css?family=Open+Sans:400,700|Droid+Sans:400,700' />
<!--[if lt IE 9]>
<link href="http://fonts.useso.com/css?family=Open+Sans:400" rel="stylesheet" type="text/css" />
<link href="http://fonts.useso.com/css?family=Open+Sans:700" rel="stylesheet" type="text/css" />
<link href="http://fonts.useso.com/css?family=Droid+Sans:400" rel="stylesheet" type="text/css" />
<link href="http://fonts.useso.com/css?family=Droid+Sans:700" rel="stylesheet" type="text/css" />
<![endif]-->
<!-- Favicon and touch icons -->
<link rel="shortcut icon" href="__PUBLIC__/admin/assets/ico/favicon.ico" type="image/x-icon" />
<!-- Css files -->
<link href="__PUBLIC__/admin/assets/css/bootstrap.min.css" rel="stylesheet">
<link href="__PUBLIC__/admin/assets/css/jquery.mmenu.css" rel="stylesheet">
<link href="__PUBLIC__/admin/assets/css/font-awesome.min.css" rel="stylesheet">
<link href="__PUBLIC__/admin/assets/plugins/jquery-ui/css/jquery-ui-1.10.4.min.css" rel="stylesheet">
<link href="__PUBLIC__/admin/assets/css/style.min.css" rel="stylesheet">
<link href="__PUBLIC__/admin/assets/css/add-ons.min.css" rel="stylesheet">
<script src="__PUBLIC__/admin/assets/js/jquery-2.1.1.min.js"></script>
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<!--百度编辑器-->

<link rel="stylesheet" href="__PUBLIC__/kindeditor/themes/default/default.css" />
<script charset="utf-8" src="__PUBLIC__/kindeditor/kindeditor-min.js"></script>
<script charset="utf-8" src="__PUBLIC__/kindeditor/lang/zh_CN.js"></script>
<!--end 百度编辑器-->
</head>
<SCRIPT LANGUAGE=javascript>   
function p_del() {   
    var msg = "确定删除本文章吗?";   
    if (confirm(msg)==true){   
    return true;   
    }else{   
    return false;   
    }   
} 
$(function(){ 
    //全选
    $("#qx").click(function(){ 
    var inputs = $('#app').find('input');
    $(this).prop('checked') ? inputs.prop('checked','checked'):inputs.removeAttr('checked');
    });
    //end全选
    var editor;
    KindEditor.ready(function(K) {
        editor = K.create('textarea[name="content"]', {
        uploadJson : '{:U("Upload/images")}',
        fileManagerJson : '{:U("Upload/file_manager")}',
        allowFileManager : true,
        
        extraFileUploadParams : {
        username : '<?php echo session("admin.username"); ?>',
        userid: '<?php echo session("admin.userid"); ?>',
        }
      });
        
        var uploadbutton = K.uploadbutton({
                    button : K('#uploadButton')[0],
                    fieldName : 'imgFile',
                    url : '{:U("Upload/images")}',
                    afterUpload : function(data) {
                        if (data.error === 0) {
                            var url = K.formatUrl(data.url, 'absolute');
                            K('#url').val(url);
                        } else {
                            alert(data.message);
                        }
                    },
                    afterError : function(str) {
                        alert('自定义错误信息: ' + str);
                    }
                });
                uploadbutton.fileBox.change(function(e) {
                    uploadbutton.submit();
                });

        
    }); 
    
});
</SCRIPT>
<body>
<!-- start: Header --> 
<include file="./head" /> 
<!-- end: Header -->
<div class="container-fluid content">
  <div class="row"> 
    <!-- start: Main Menu --> 
    <include file="./slide" /> 
    <!-- end: Main Menu --> 
    <!-- start: Content -->
    <div class="main sidebar-minified">
      <div class="row">
        <div class="col-md-7">
          <div class="panel panel-default">
            <div class="panel-heading">
              <h2><i class="fa fa-indent red"></i><strong>{$title}</strong></h2>
            </div>
            <div class="panel-body">
            <form action="{:U('Help/add_update')}" method="post"   class="form-horizontal">
             <input type="hidden" value="{$help.id}" name="id" >
              <div class="form-group">
                <label class="col-md-2 control-label" for="text-input">文章标题</label>
                <div class="col-md-10">
                  <input type="text" id="title" name="title" class="form-control" placeholder="" value="{$help.title}">
                </div>
              </div>
      <div class="form-group">
                    <label class="col-sm-2 control-label" for="input-normal">分类</label>
                    <div class="col-sm-6">
                        <select id="cid" name="type" class="form-control" size="1">
                          <option value="1"   <?php if($help['type'] ==1){?> selected <?php }?> >帮助</option>
                          <option value="2"   <?php if($help['type'] ==2){?> selected <?php }?>   >通知</option>
                          </select>
                    </div>
             </div>

              <div class="form-group">
                <label class="col-md-2 control-label" for="disabled-input">排序</label>
                <div class="col-md-10">
                  <input type="text" id="sort" name="sort" class="form-control" placeholder=""  value="{$help.sort}">
                </div>
              </div>
              <div class="form-group">
                <label class="col-md-2 control-label" for="textarea-input">文章内容</label>
                <div class="col-md-10">
                  <textarea  name="content" rows="9" style="width:100%; height:300px;"  placeholder="" id="content">{$help.content}</textarea>
                </div>
              </div>
              </div>
              <div class="panel-footer">
            <div class="row">
            <div class="col-md-2"></div>
            <div class="col-md-7">
       
              <input type="submit" class="btn btn-primary"  value="提交">
             </div>   
             </div>
          </div>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>
<include file="./foot" />
</body>
</html>